<?php
$redisHandel = new Redis();
echo '<body style="text-align: center;"><h1>connect redis is ';
try {
    $redisHandel->connect('redis', 6379);
    $redisHandel->ping();
    echo 'success';
} catch (RedisException $exception) {
    echo 'fail!</h1><br>[' . $exception->getMessage() . ']';
}
echo '</body>';